package com.bai.qf2201.service.Impl;

import com.bai.qf2201.mapper.userMapper;
import com.bai.qf2201.po.User;
import com.bai.qf2201.service.userService;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class userServiceImpl implements userService {
    @Resource
    private userMapper um;
    @Override
    public List<User> findAll() {
        return null;
    }

    @Override
    public User findOneById(int id) {

        User oneById = um.findOneById(id);
        return oneById;
    }

    @Override
    public int updateTelById(int id, String tel) {
        int i = um.updateTelById(id, tel);
        return i;
    }


    @Override
    public User findOneLogin(String tel, String password) {
        User oneLogin = um.findOneLogin(tel, password);

        System.out.println(oneLogin);
        return oneLogin;
    }

    @Override
    public int addOne(User user) {
        int i = um.addOne(user);
        return i;
    }

    @Override
    public int delOne(int id) {
        return 0;
    }

    @Override
    public int updateOne(User user) {
        return 0;
    }
}
